package module.dao;

import common.annotation.DaoSql;
import common.annotation.QueryDao;
import common.bean.SearchPageResult;
import common.bean.SearchParameter;
import common.dao.BaseDao;
import module.model.AssessmentItemModel;

import java.util.List;

@QueryDao
public interface AssessmentItemDao extends BaseDao<Long,AssessmentItemModel> {
    @DaoSql(sql="SELECT * FROM assessment_item WHERE 1=1 { and DATA_ID=:dataId } { and FORM_ID=:formId } ",resultType = "List[AssessmentItemModelMapping]")
    List<AssessmentItemModel> getAssessmentItemModelListBySearchParameter(SearchParameter searchParameter);

    @DaoSql(sql="SELECT * FROM assessment_item WHERE 1=1 { and DATA_ID=:dataId } { and FORM_ID=:formId } order by POS asc",resultType = "Page[AssessmentItemModelMapping]")
    SearchPageResult<AssessmentItemModel> getAssessmentItemModelListPage(SearchParameter searchParameter);
}
